<!--
/**
* Author: gaohui
* Date: 2023-03-02 15:09
* Desc: SonComp 测试孙组件
*/
-->

<template>
  <div class="son-comp-container">
    <div class="mb10">孙组件</div>
    <div>获取到的父组件名称：{{ name }}</div>
  </div>
</template>

<script name="SonComp" lang="ts" setup>
import { inject } from "vue";

const name = inject("name");
</script>
<style lang="scss" scoped>
.son-comp-container {
  height: 100px;
  padding: 20px;
  box-sizing: border-box;
  border-radius: 8px;
  border: 1px solid #999999;
}
</style>
